<?php
ini_set('max_execution_time', 0);

require_once 'bootstrap.php';

$logPath = 'C:\var\log\seo_patrol\server.log';
Ezer_Log::setLogger(new Ezer_FileLogger($logPath, true));

$config = Ezer_Config::createFromPath('config.xml');
$dbConfig = $config->database->toArray();

$server = new Ezer_BusinessProcessServer(new Ezer_PropelLogicPersistance($dbConfig));
$server->addCasePersistance(new Ezer_PropelCasePersistance($dbConfig));

$thread = $config->server->threads;
for($i = 0; $i < $thread; $i++)
	$server->addThreadClient(new SeoProcessClient($server, $config->phpExe));

Ezer_Config::createFromPath('engines_config.xml', LogicManager::ENGINES_CONFIG);

$server->run();
